FIltering with attributes

Hi all,

Here is the scenario.

There are 2 different modules, namely A and B.

+Module A contains in-links to Module B.
+Module A contains attribute "user" (user=user1,user2,usern)
+Module B contains attribute "state" (State=Approved, NotApproved)

Action:
User creates an object in Module A, and links it to an object in Module B and sets attribute State (in created object) to Approved.

Is there a way to count how many objects satisfy this condition using the filtered provided within DOORS?

(IF object in Module A was created by USER1) AND (it contains an inlink to Module B that has attribute State EQUAL to APPROVED)

I know how to implement the first part, not so the second one.

Thanks for your help!
CJ
anrivel - Thu Jun 03 15:44:31 EDT 2010

Re: FIltering with attributes
SystemAdmin - Fri Jun 04 00:53:22 EDT 2010

>(it contains an inlink to Module B that has attribute State EQUAL to APPROVED)

Create a traceability column showing the inlinks from Module B (showing the State attribute value) and do a column filtering based on the column contents.

You could also convert the created traceability layout DXL column to a DXL attribute and then you could filter with normal attribute filtering (contains).

Re: FIltering with attributes
anrivel - Fri Jun 04 13:39:11 EDT 2010

SystemAdmin - Fri Jun 04 00:53:22 EDT 2010
>(it contains an inlink to Module B that has attribute State EQUAL to APPROVED)

Create a traceability column showing the inlinks from Module B (showing the State attribute value) and do a column filtering based on the column contents.

You could also convert the created traceability layout DXL column to a DXL attribute and then you could filter with normal attribute filtering (contains).

I'll try that and let you know.

THanks for the help

Re: FIltering with attributes
anrivel - Fri Jun 04 14:21:44 EDT 2010

anrivel - Fri Jun 04 13:39:11 EDT 2010
I'll try that and let you know.

THanks for the help

I am having trouble to "show the state attribute" of Module B.

When I created the new column, I was able to then filter which objects of Module A had links to Module B. I still can't discriminate if THOSE objects from module B are has state=Approved.

Re: FIltering with attributes
SystemAdmin - Fri Jun 04 14:49:32 EDT 2010

anrivel - Fri Jun 04 14:21:44 EDT 2010
I am having trouble to "show the state attribute" of Module B.

When I created the new column, I was able to then filter which objects of Module A had links to Module B. I still can't discriminate if THOSE objects from module B are has state=Approved.

Create a trace column to a specific module (using Analysis Wizard), then you can select which attribute values to show from that specific module.

Re: FIltering with attributes
llandale - Fri Jun 04 17:57:34 EDT 2010

Normal filtering won't deal with attribute values in other modules. So lets grab the attribute State values in B and deposit them in A; THEN filter A.

So lets create an AttrDXL in A called "State-of-B". This Attr DXL follow Outlinks from A and when it finds an Object in B it will display the identifier of the B object along with the State, perhaps looks like "B-Mod_11 - Approved". It will handle multiple B objects. If it finds no B links or only null State values it displays a single space.

Put attribute State-of-B in the current View of A. Create a Filter in A for when attribute State-of-B includes 'Approved' AND attribute Created By is equal to 'ThatUser'. Save the View.

  • Louie

Re: FIltering with attributes
SystemAdmin - Sun Jun 06 21:57:36 EDT 2010

llandale - Fri Jun 04 17:57:34 EDT 2010
Normal filtering won't deal with attribute values in other modules. So lets grab the attribute State values in B and deposit them in A; THEN filter A.

So lets create an AttrDXL in A called "State-of-B". This Attr DXL follow Outlinks from A and when it finds an Object in B it will display the identifier of the B object along with the State, perhaps looks like "B-Mod_11 - Approved". It will handle multiple B objects. If it finds no B links or only null State values it displays a single space.

Put attribute State-of-B in the current View of A. Create a Filter in A for when attribute State-of-B includes 'Approved' AND attribute Created By is equal to 'ThatUser'. Save the View.

  • Louie

Louie wrote: "...Normal filtering won't deal with attribute values in other modules. So lets grab the..."

Wouldn't the "Column" tab in the Filter dialogue box help here as well? It supports filtering in DXL layout columns.


Paul Miller

Re: FIltering with attributes
anrivel - Thu Jun 10 10:06:02 EDT 2010

SystemAdmin - Fri Jun 04 14:49:32 EDT 2010
Create a trace column to a specific module (using Analysis Wizard), then you can select which attribute values to show from that specific module.

"then you can select which attribute values to show from that specific module."

Everything should work as you guys have explained. The only problem now is the attribute "state" (which, by the way is of type State) isn't being listed when I use the wizard.

Re: FIltering with attributes
anrivel - Thu Jun 10 10:11:46 EDT 2010

anrivel - Thu Jun 10 10:06:02 EDT 2010
"then you can select which attribute values to show from that specific module."

Everything should work as you guys have explained. The only problem now is the attribute "state" (which, by the way is of type State) isn't being listed when I use the wizard.

Adding a little bit to this,

I was able to show others atttributes from Module B, which in essence is what I wanted, but for some reason, this specific attribute isn't showing up.

Re: FIltering with attributes
kbmurphy - Thu Jun 10 11:18:45 EDT 2010

anrivel - Thu Jun 10 10:11:46 EDT 2010
Adding a little bit to this,

I was able to show others atttributes from Module B, which in essence is what I wanted, but for some reason, this specific attribute isn't showing up.

You can always edit the code in the layout DXL column and include the extra attribute. It's not that hard--just look towards the bottom of the code and you'll see how it displays the information you told it to. Just copy and paste a couple of lines and put in your attribute name and it ought to work.

Re: FIltering with attributes
anrivel - Thu Jun 10 11:25:57 EDT 2010

anrivel - Thu Jun 10 10:11:46 EDT 2010
Adding a little bit to this,

I was able to show others atttributes from Module B, which in essence is what I wanted, but for some reason, this specific attribute isn't showing up.

..and adding a little bit more (sorry :))

I just found out that, after creating the new column(with the inlinks to Module B) in Module A, when I try to apply a filter, in the Column tab I see various attributes of module B.

Since I created that new column, it is seen listed here as well, and it is of type "Layout DXL".

Now, the attribute "State" (which Module A ALSO has), I previously said it was of type State as well. I was incorrecto, it is a DXL attribute.

So, my question is

1) Why, when I do the analysis wizard, not all the attributes of module B are listed?

2) What is the difference between a DXL Attribute vs. Layout DXL?

Re: FIltering with attributes
anrivel - Thu Jun 10 11:28:11 EDT 2010

anrivel - Thu Jun 10 11:25:57 EDT 2010
..and adding a little bit more (sorry :))

I just found out that, after creating the new column(with the inlinks to Module B) in Module A, when I try to apply a filter, in the Column tab I see various attributes of module B.

Since I created that new column, it is seen listed here as well, and it is of type "Layout DXL".

Now, the attribute "State" (which Module A ALSO has), I previously said it was of type State as well. I was incorrecto, it is a DXL attribute.

So, my question is

1) Why, when I do the analysis wizard, not all the attributes of module B are listed?

2) What is the difference between a DXL Attribute vs. Layout DXL?

murhpy, I was posting my last message while you wrote yours.

I apologize, will try what you suggests!

Re: FIltering with attributes
llandale - Thu Jun 17 13:40:46 EDT 2010

anrivel - Thu Jun 10 11:25:57 EDT 2010
..and adding a little bit more (sorry :))

I just found out that, after creating the new column(with the inlinks to Module B) in Module A, when I try to apply a filter, in the Column tab I see various attributes of module B.

Since I created that new column, it is seen listed here as well, and it is of type "Layout DXL".

Now, the attribute "State" (which Module A ALSO has), I previously said it was of type State as well. I was incorrecto, it is a DXL attribute.

So, my question is

1) Why, when I do the analysis wizard, not all the attributes of module B are listed?

2) What is the difference between a DXL Attribute vs. Layout DXL?

I suspect one of your modules has a layout code in a COLUMN titled 'State', which is not an attribute and won't appear in any list of attributes including the Wizard.

Am confused about this thread. Perhaps the following helps:

'Layout' code exists in a column and saved in a view and displays info about that object in that column. You cannot 'query' it from some other module directly, but you can indeed load the module visible, load the view, then query the 'text' of that column for a particular object, if that object is displayed. Yuuuck. Layout also re-calculates every time the module window is refreshed, which is dozens of times per second when moving some other module over it, and is about 4 times for each object displayed whenever you scroll the module. When Layout displays info from linked objects, its slow and the refresh rate will often throw DOORS response times into the abyss.

'Attr-DXL' is code stored in an attribute and 'displays' info about that object, whether its showing or not. Attr-DXL is NOT auto-re-calculated often, just the first time its accessed after the module is open; or whenever the calculated value is null. As with other attributes you can display it in a column in a view. You can indeed query the value just like other obj-attr values. When you 'refresh DXL Attributes', it simply sets the value of all objects for that attr to null, forcing re-calculation.

Att-DXL is superior to Layouts except [1] that it requires write rights to the module to create the attribute; whereas anyone can create a layout and store it in their view. [2] you often must manually force re-calculation in order to retrieve the current value, presuming something else has changed (such as adding a link). Therefore, retrieving Attr-DXL value could routinely look like this:

noError() objInOtherMod.NameAttrDXL = 
"" lastError() string OtherValue = objInOtherMod.NameAttrDXL.


The main trick to Attr-DXL, BTW, is to conclude it with code like this:

string Results = calculate what I want to display in the attribute 

if (

null Results) 
//- then obj.attrDXLName = 
" " 

else obj.attrDXLName = Results

Setting it to a space instead of null will prevent constant recalculation. Other DXL that queries the value must check for a null or a space value, perhaps like this:

string OtherValue = oFromOtherModule.NameAttrDXL 

if (

null OtherValue or OtherValue == 
" ") 
// then deal with 

null  OtherValue 

else deal with valid OtherValue

  • Louie